﻿using T_vehicle.Infrastructure.Impl;
using T_vehicle.Infrastructure.Interfacec;

namespace T_vehicle.Read.API.Extensions
{
    public static class ServicesColltionExtenssions
    {
        /// <summary>
        /// 扩展注入
        /// </summary>
        /// <param name="services"></param>
        /// <returns></returns>
        public static IServiceCollection AddServices(this IServiceCollection services)
        {
            //维修记录
            services.AddScoped<IRepairRepository, RepairRepository>();

            //保养记录
            services.AddScoped<IMaintenanceRepository, MaintenanceRepository>();

            //违章记录
            services.AddScoped<IIllegalRepository, IllegalRepository>();

            //事故
            services.AddScoped<IAccidentRepository, AccidentRepository>();

            //新增使用
            services.AddScoped<ITiresUsedRepository, TiresUsedRepository>();

            //新增费用信息表
            services.AddScoped<IExpensesRepository, ExpensesRepository>();

            return services;
        }
    }
}
